<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-3.2.1.min.js"></script>
    <style>
        .descendants * {
            display: block;
            border: 2px solid lightgrey;
            color: lightgrey;
            padding: 5px;
            margin: 15px;
        }
    </style>
</head>
<body>
    <div class="descendants" style="width:500px;">div (当前元素)
        <p>p (儿子元素)
            <span class="1">span (孙子元素)</span>
        </p>
        <p>p (儿子元素)
            <span class="2">span (孙子元素)</span>
        </p>
    </div>

    <script>
        $(function () {
            $('p').children("span").css({"color":"red","border":"2px solid red"});
        })
    </script>
</body>
</html>